import navbar from '@/pages/components/navbar'
import tabbar from '@/pages/components/tabbar'
import Home from '@/pages/Home'
import Login from '@/pages/Login'
import Footer from '@/pages/components/wel_tab'
import productList from '@/pages/product'
import main from '@/pages/main'
import approval from '@/pages/approval'
import pending from '@/pages/pending'
import edit from '@/pages/product/edit'
import detail from '@/pages/product/detail'

const routes = [
  { path: '/', redirect: '/login' },
  {
    path: '/home',
    components: { header: navbar, default: Home, footer: tabbar }

  },
  {
    path: '/login',
    components: { default: Login, footer: Footer },
    meta: { nologin: true }
  },
  {
    path: '/project/list',
    components: { header: navbar, default: productList, footer: tabbar },
    meta: { title: '我的项目' }

  },
  {
    path: '/pending',
    components: { header: navbar, default: pending, footer: tabbar },
    meta: { nologin: true, title: 'ing...' }
  }, {
    path: '/main',
    components: { header: navbar, default: main, footer: tabbar },
    meta: { title: '我的主页' }

  }, {
    path: '/approval',
    components: { header: navbar, default: approval, footer: tabbar },
    meta: { title: '审批中心' }

  },
  {
    path: '/project/edit',
    components: { header: navbar, default: edit, footer: tabbar },
    meta: { title: '采购新增' }

  },
  {
    path: '/product/detail/:id',
    components: { header: navbar, default: detail, footer: tabbar },
    meta: { title: '订单详情' }

  }
]
export default routes
